<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%> 
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="bean" uri="http://struts.apache.org/tags-bean"%>
<%@ taglib prefix="html" uri="http://struts.apache.org/tags-html"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script type="text/javascript">
function getHTTPObject(){
	var xhr = false;
	if(window.XMLHttpRequest){
		xhr = new XMLHttpRequest();
		alert('s12');
	}
	else if(window.ActiveXObject){
		xhr = new ActiveXobject("Microsoft.XMLHTTP");
	}
	return xhr;
	
	
}

 function saveDraft(){
    
 
 }
</script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<center>
<p>

<html:errors property="CidError"  />
<html:errors property="TitleError"  />

</p>
<form action="post.do?act=doUpdatePost&id=${post.id }" method="post">
 <label>o标题</label><input type="text" name="title" value="${post.title}"><br>
 <label>文章</label> <textarea name="content" >${post.content }</textarea><br>
 <label>标签</label><input type="text" name="tag" value="${post.tag }"><br>
 <label>分类</label><select name="cid" >
 <c:forEach var="cat" items="${categories}">
 <option value="${cat.id}" >${cat.name }</option>
 </c:forEach>
  </select><br>
  <input type="hidden" name="originalCID" value="${post.cid }" > 
  <input type="hidden" name="originalTag" value="${post.tag }" />  
 <input type="submit" value="提交"><input type="submit" value="保存草稿"><br>
</form>
</center>

</body>
</html>